<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>My JSP 'index.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	
	<script type="text/javascript" src="js/jquery-1.8.1.js"></script>  
    <script type="text/javascript">  
        $(function(){  
            $(".thumbs a").click(function(){  
                var largePath=$(this).attr("href");  
                var largeAlt=$(this).attr("title");  
                $("#largeImg").attr({  
                    src:largePath,  
                    alt:largeAlt  
                });  
                return false;  
            });  
        });  
    </script>
	
</head>

<body>
	This is my 上传 page.
	<br>
	<form action="servlet/SmartUploadServlet" method="post" enctype="multipart/form-data">
		上传用户：<input type="text" name="user"><br /> 
		用户名称：<input type="text" name="name"><br /> 
		上传文件1：<input type="file" name="file1"><br /> 
		上传文件2：<input type="file" name="file2"><br /> 
		<input type="submit" value="提交">
	</form>
	
	<span style="font-size:18px;">  下载：<a href="smartDownloadServlet.do?filename=img5-lg.jpg">img5-lg.jpg</a>  
    <hr>  
    <h2>图片预览</h2>  
    <p><img id="largeImg" src="images/img1-lg.jpg" alt="Large Image"/></p>  
    	<p class="thumbs">  
	        <a href="images/img2-lg.jpg" title="Image2"><img src="images/img2-thumb.jpg"></a>  
	        <a href="images/img3-lg.jpg" title="Image3"><img src="images/img3-thumb.jpg"></a>  
	        <a href="images/img4-lg.jpg" title="Image4"><img src="images/img4-thumb.jpg"></a>  
	        <a href="images/img5-lg.jpg" title="Image5"><img src="images/img5-thumb.jpg"></a>  
	        <a href="images/img6-lg.jpg" title="Image6"><img src="images/img6-thumb.jpg"></a>  
   		</p> 
    </span>
</body>
</html>
